/**
 * Copyright (c) 2016 Lenovo Group
 * All Rights Reserved.
 * 
 * Project Name:assign-tracer
 * Create Time: 2016年1月21日 下午9:22:27
 */
package com.lenovo.lmrp.server.appgateway.util;

import com.lenovo.sdc.framework.util.AttributeBean;

/**
 * @author zhangzhenga
 *
 */
public class PropertiesUtil {

    private static AttributeBean attributeBean;

    public static AttributeBean getAttributeBean() {
        return attributeBean;
    }

    public static void setAttributes(AttributeBean attributes) {
        attributeBean = attributes;
    }
    
    public static String getStringValue(String key,String defaultValue){
    	return getAttributeBean().getAttribute(key, defaultValue);
    }
    
    public static String getStringValue(String key){
    	return getAttributeBean().getAttribute(key, "");
    }
    
    public static int getIntValue(String key,int defaultValue){
    	return getAttributeBean().getAttribute(key, defaultValue);
    }
    
    public static int getIntValue(String key){
    	return getAttributeBean().getAttribute(key, -1);
    }
    public static boolean getBooleanValue(String key,boolean defaultValue){
    	return getAttributeBean().getAttribute(key, defaultValue);
    }
    public static boolean getBooleanValue(String key){
    	return getAttributeBean().getAttribute(key, false);
    }
}
